<!DOCTYPE html>
<html >
<meta charset="utf-8">
<head >
<#include "/page/include.ftl">

</head>
<body class="white-bg">
	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
		<form class="form-horizontal m" id="form-mq-add">



            <div class="form-group">
                        				<label class="col-sm-3 control-label">插件名称：</label>
                        				<div class="col-sm-8">
                                        	<input class="form-control" type="text" name="pluginname" id="pluginname">
                                        </div>
                        </div>

			<div class="form-group">
            				<label class="col-sm-3 control-label">作业名称：</label>
            				<div class="col-sm-8">
                            	<input class="form-control" type="text" name="filename" id="filename">
                            </div>
            </div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">是否加密：</label>
				<div class="col-sm-8">
					<select id="encrypt" name="encrypt" class="form-control m-b" with="100px">
			               <option value="2">非加密</option>
 				           <option value="1">加密</option>
	                   
	                </select>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">数据传输结构：</label>
				<div class="col-sm-8">
					<select id="datatype" name="datatype" class="form-control m-b" with="100px">
			               <option value="xml">XML</option>
 				           <option value="json">JSON</option>
	                   
	                </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">MQ类型：</label>
				<div class="col-sm-8">
					<select id="mqtype" name="mqtype" class="form-control m-b" with="100px">
			               <option value="activemq">activemq</option>
 				           <option value="rabbitmq">rabbitmq</option>
	                       <option value="rocketmq">rocketmq</option>
	                </select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">是否批量：</label>
				<div class="col-sm-8">
					<select id="is_batch" name="is_batch" class="form-control m-b" with="100px">
			               <option value="2">是</option>
 				           <option value="1">否</option>
	                   
	                </select>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">表名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="table_name" id="table_name">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">HOST名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="host" id="host">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">端口号：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="port" id="port">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">用户名：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="username" id="username">
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">密码：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="password" id="password">
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">主题名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="queue" id="queue">
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-3 control-label">子主题名称：</label>
				<div class="col-sm-8">
					<input class="form-control" type="text" name="tags" id="tags">
				</div>
			</div>
			

		
		</form>
	</div>
	
	<script src="${rc.contextPath}/static/ajax/libs/select/select2.js"></script>
	<script>
	  var prefix = ctx;
       
        
        $("#form-mq-add").validate({
        	onkeyup: false,
        	rules:{
        	    "filename":{

        	       required:true,
        	    },
        	    "pluginname":{

                   required:true,
                },
        		table_name:{
        			required:true,
        		},
        		host:{
        			required:true,
        		},
        		port:{
        		    required:true,
        			digits:true
        		},
        		topic:{
        		  required:true,
        		}
        	},
        	messages: {
                "menuName": {
                    remote: "菜单已经存在"
                }
            },
            focusCleanup: true
        });
        
         function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "mq/save", $('#form-mq-add').serialize());
	        }
	    }

        
		
		
    </script>
</body>
</html>
